package com.nyist;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 1. rabbit 启动类
 *
 * @author yangxiaogen
 * @date 2023/3/2 15:50
 */
@SpringBootApplication
@EnableTransactionManagement // 启用事务管理
public class RabbitMQNyistApplication implements CommandLineRunner {

    @Value("${server.port}")
    private String port;

    private static final Logger logger = LoggerFactory.getLogger(RabbitMQNyistApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(RabbitMQNyistApplication.class, args);
    }

    @Override
    public void run(String... args) {
        logger.info("========rabbitmq 端口为: " + port + ", 模块启动完成!========");
    }

}
